package com.vq.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * 用户
 */
@Data
public class User {
    private Long id;
    private String email;//电子邮箱
    private String username;
    private String account;
    private String password;
    private Integer followersNum;//关注量
    private Integer fansNum;//粉丝量
    @TableField(exist = false)//不参与数据库操作
    private int onlineNum;

    public User() {
    }
    public User(String email) {
        this.email = email;
    }
    public User(String email, String username, String password) {
        this.email = email;
        this.username = username;
        this.password = password;
    }
    public User(Long id, String username, String account, String password) {
        this.id = id;
        this.username = username;
        this.account = account;
        this.password = password;
    }
    public User(Long id, String email, String username, String account, String password) {
        this.id = id;
        this.email = email;
        this.username = username;
        this.account = account;
        this.password = password;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", email='" + email + '\'' +
                ", username='" + username + '\'' +
                ", account='" + account + '\'' +
                ", password='" + password + '\'' +
                ", followersNum=" + followersNum +
                ", fansNum=" + fansNum +
                '}';
    }
}
